// SetUnhandledExceptionFilterExample.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <Windows.h>

LONG WINAPI MyUnhandlerExceptionFilter(IN struct _EXCEPTION_POINTERS *ExceptionInfo)
{
	MessageBox(NULL, "Ok", "", MB_OK);
	return EXCEPTION_EXECUTE_HANDLER;
}

int main(int argc, char* argv[])
{
//	printf("Hello World!\n");
	SetUnhandledExceptionFilter(MyUnhandlerExceptionFilter);
	__asm
	{
//		xor eax, eax
//		mov eax, [eax]
		int 3;
	}
	MessageBox(NULL, "Debugger Found", "Warning", MB_OK);
	return 0;
}

